- title 'Sign up'
- content_for :title do
  %h1 Sign up to easyBacklog
- content_for :head do
  = javascript_include_tag 'validation', 'register_and_account'

= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
  %p
    It's free to sign up, however we do need a few details to help set up your account for you.
    %br
    Please complete all the fields below.

  #sign-up
    - unless @account.blank?
      %h2.divider
        Account details
        %span.hint (step 1 of 2)
      - unless @account.errors.empty?
        .form_errors
          The account details were not completed correctly.  Please correct the following fields to register:
          %ul
            - @account.errors.full_messages.each do |error|
              %li
                = error
      .data-area
        = hidden_field_tag :show_account_setup, 'true'

        = fields_for @account do |f|
          != render :partial => '/accounts/form', :locals => { :f => f, :account => @account }

    %br
    %h2.divider
      Your details
      %span.hint (step 2 of 2)
    .data-area.no-padding
      != render :partial => 'form', :locals => { :f => f, :user => resource }

    %p
      = f.submit "Sign up"
      .waiting
        %div.icon
          %span.progress-icon
        %div
          Please wait a few seconds whilst we prepare your account, we're busy at work.


= render :partial => "devise/shared/links"
